<?php
//require_once 'Zend/Controller/Plugin/Abstract.php';
class MyAcl extends Zend_Acl
{
	public function __construct(Zend_Auth $auth)
	{
		//parent::__construct();

		$roleGuest = new Zend_Acl_Role('guest');

		//$this->add(new Zend_Acl_Resource('auth'));
		$cms = new Zend_Acl_Resource('cms');
		$this->add($cms);

		$default = new Zend_Acl_Resource('default');
		$this->add($default);
		//$this->add(new Zend_Acl_Resource('index'),'default');

		$this->addRole(new Zend_Acl_Role('guest'));
		//$this->addRole(new Zend_Acl_Role('member'), 'guest');
		$this->addRole(new Zend_Acl_Role('admin'), 'guest');

		//$this->allow('guest', 'auth');
		$this->allow('guest',$default);
		/*
		 $this->allow('guest',$default,'error');
		 $this->allow('guest', $default, 'auth');
		 $this->allow('guest',$default,'index');
		 $this->allow('guest',$default,'news');
		 $this->allow('guest',$default,'article');
		 $this->allow('guest',$default,'special');
		 $this->allow('guest',$default,'company');
		 $this->allow('guest',$default,'furniture');
		 $this->allow('guest',$default,'notice');
		 $this->allow('guest',$default,'review');
		 $this->allow('guest',$default,'exhibition');
		 $this->allow('guest',$default,'center');
		 $this->allow('guest',$default,'blocknote');
		 */
		//$this->allow('guest','error');
		$this->deny('guest', $cms);


		$this->allow('admin');
		$this->allow('admin', $cms);
	}
}